<script setup>

import SvgIcon from "../Svglcon.vue";
import {ref} from "vue";

const rotateAngle = ref(0)
const textureHeight = ref('0')
const textureWidth = ref(0)

function handleChangetextureHeight(value) {
  textureHeight.value = value + 1;
}
</script>

<template>
  <div class="bodyCenter">
    <div class="textureToolWrap">
      <div class="textureTitleBar">

        <div style="font-size: 20px">
          <svg-icon name="close"/>
        </div>

        <div class="title">纹理工具</div>
        <div style="font-size: 20px">
          <svg-icon name="close"/>
        </div>
        <div style="font-size: 20px">
          <svg-icon name="close"/>
        </div>
        <div style="font-size: 20px">
          <svg-icon name="close"/>
        </div>

      </div>
      <div class="textureKeyboard">
        <div class="firstLine">
          <div class="title">
            旋转角度
          </div>
          <div class="" style="width: 184px">
            <el-slider v-model="rotateAngle" :show-tooltip="false"/>
          </div>
          <div>
            <el-input-number
                v-model="rotateAngle"
                :min="0"
                :max="180"
                controls-position="right"
                size="small"
                class="du-el-input-number"
            >
            </el-input-number>
          </div>
        </div>
        <div class="secondLine">
          <div class="title">
            贴图宽度
          </div>
          <el-input-number
              v-model="textureWidth"
              :min="0"
              :max="180"
              controls-position="right"
              size="small"
              class="mm-el-input-number"
          >
          </el-input-number>
          <div class="centerButton"></div>


          <div class="title">
            贴图高度
          </div>
          <el-input-number
              v-model="textureHeight"
              :min="0"
              :max="180"
              controls-position="right"
              size="small"
              @handleChange="handleChangetextureHeight"
              class="mm-el-input-number"
          >
          </el-input-number>


        </div>

      </div>
    </div>
  </div>


</template>

<style scoped lang="scss">


.bodyCenter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.textureToolWrap {
  width: 352px;
  height: 130px;
  box-sizing: border-box;
  border: 1px solid #797979;
  display: flex;
  flex-direction: column;
  align-items: center;

}


.textureTitleBar {
  display: flex;
  height: 30px;
  justify-content: center;
  align-items: center;
  width: 100%;

  .title {
    width: 100%;
    font-size: 14px;
    text-align: left;
    color: #999999;

  }

}

.textureKeyboard {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;

  .firstLine {
    height: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;


  }

  .secondLine {
    height: 50%;
    display: flex;
    justify-content: space-around;
    align-items: center;

    .centerButton {
      width: 33px;
      height: 33px;
      border: #999999 solid 1px;
      border-radius: 4px;
    }


  }

  :deep(.el-input-number.is-controls-right[class*=small] [class*=decrease], .el-input-number.is-controls-right[class*=small] [class*=increase]) {
    --el-input-number-controls-height: 15px;
  }

  :deep(.el-input-number--small) {
    width: 71px;
    height: 30px;
  }

  :deep(.el-input-number.is-controls-right .el-input__wrapper) {
    padding-left: 0px;
  }
}

.mm-el-input-number {
  position: relative;
}
.mm-el-input-number::after {
  content: 'mm';
  display: inline-block;
  height: 20px;
  line-height: 20px;
  width: 10px;
  text-align: center;
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
}
.du-el-input-number {
  position: relative;
}
.du-el-input-number::after {
  content: '°';
  display: inline-block;
  height: 20px;
  line-height: 20px;
  width: 10px;
  text-align: center;
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
}






</style>